/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package naptanparser;

/**
 *

 * @author david
 */
public class GPSPoint {

    private final Double _latitude;
    private final Double _longitude;

    public GPSPoint (Double latitude, Double longitude) {
        this._latitude = latitude;
        this._longitude = longitude;
    }

    public Double getLatitude() {
        return _latitude;
    }

    public Double getLongitude() {
        return _longitude;
    }

    @Override
    public int hashCode() {
        return _latitude.hashCode() ^ _longitude.hashCode();
    }

    @Override
    public boolean equals(Object o) {
        if (o == null) {
            return false;
        }
        if (!(o instanceof GPSPoint)) {
            return false;
        }
        GPSPoint pairo = (GPSPoint) o;
        return this._latitude.equals(pairo.getLatitude()) &&
                this._longitude.equals(pairo.getLongitude());
    }
}
